public function all(){
	${$tableName}Model = D('{$TableName}');
	$getDataArr=I('get.');
	$where=array(); 
	$searchFieldArr=${$tableName}Model->searchFieldDict();
	foreach($searchFieldArr as $k=>$v){
        if(isset($getDataArr[$k])){
        	if($v['inType']=='text'){
                $$k=I("$k",'','htmlspecialchars');
                if($$k!=''){
                	$where[$k]=array('like','%'.$$k.'%'); 
                }
        	}elseif($v['inType']=='select'){
        		if(isset($v['option_val_type']) && $v['option_val_type']=='char'){
                    $$k=I("$k",'','htmlspecialchars');
	                if($$k!=''){
	                	$where[$k]=$$k; 
	                }                     
        		}else{
        			$$k=I("$k",0,'intval');
        			if(isset($v['default']) && !empty($v['default'])){
		                if($$k!=$v['default']){
		                	$where[$k]=$$k; 
		                } 
        			}else{
		                if(!empty($$k)){
		                	$where[$k]=$$k; 
		                } 
        			}	                                   
        		}
        	}
        }else{
	        if($v['inType']=='datetime'){
	                $t1=I('t1','','htmlspecialchars');
	                $t2=I('t2','','htmlspecialchars');  
	                if($v['dataType']=='int'){
                       $t1=strtotime($t1);
                       $t2=strtotime($t2);                       
	                }
	                if($t1!='' && $t2!=''){
	                    $where[$k]=array(array('gt',$t1),array('lt',$t2)); 
	                }else{
		                if($t1!=''){
		                	$where[$k]=array('gt',$t1); 
		                }
		                if($t2!=''){
		                	$where[$k]=array('lt',$t2); 
		                }                 	
	                }              
	        }
	    }	    
	}

	$count = ${$tableName}Model->where($where)->count();
	$Page = new Page($count,15);	//实例化分页类 传入总记录数和每页显示的记录数(15)
	$show = $Page->show();	//分页显示输出
	${$tableName}List = ${$tableName}Model->where($where)->order('{$primaryKey} desc')->limit($Page->firstRow.','.$Page->listRows)->select();	//分页查询
	$this->assign('page',$show);	//赋值分页输出
	$this->assign('{$tableName}List', ${$tableName}List);
	$this->display();
}